package edu.cmu.atlub.model;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import edu.cmu.atlub.persistence.ConnectionManager;

public class ProcessedSusModel {
    public static void insertUser(long userId) throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException {
	Connection conn = ConnectionManager.getConnection();
	insertUser(userId, conn);
	conn.close();
    }
    
    public static void insertUser(long userId, Connection conn) throws SQLException {
	String sqlStr = "INSERT IGNORE INTO processed_sus (user_id) VALUES (?);";
	PreparedStatement stmt = conn.prepareStatement(sqlStr);
	stmt.setLong(1, userId);
	stmt.executeUpdate();
    }
    
}
